﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Code.Models
{
    public enum AuthorityState
    {
        /// <summary>
        /// 禁用
        /// </summary>
        Disable = 0,
        /// <summary>
        /// 启用
        /// </summary>
        Enable = 1,
    }


    public static class AuthorityStateEx
    {
        public static string GetName(this AuthorityState state)
        {
            switch (state)
            {
                case AuthorityState.Enable:
                    return "启用";
                case AuthorityState.Disable:
                    return "禁用";
                default:
                    return state.ToString();
            }
        }
    }
}
